<template>
  <div class="app">
    <myNavbar title="绑定紧急联系人"></myNavbar>
    <list>.
      <cell>
        <div class="realName">
          <div class="realName_item">
            <text class="realName_item_title">紧急联系人:</text>
            <input class="realName_item_content" v-model="realNameForm.liaisonName" placeholder="请输入紧急联系人姓名"/>
          </div>
          <div class="realName_item">
            <text class="realName_item_title">手机号:</text>
            <input class="realName_item_content" v-model="realNameForm.liaisonMobile" placeholder="请输入手机号"/>
          </div>
        </div>
        <div class="realName">
          <div class="realName_botton botton_Bg_Color" @click="realNameClick">
            <text class="realName_botton_title">确定绑定</text>
          </div>
        </div>
      </cell>
    </list>
  </div>
</template>
<script>
import myNavbar from "../../../components/myNavbar/myNavbar";
import {bindLiaison} from '../../../api/member'
export default {
  name: "index",
  data() {
    return {
      realNameForm: {
        liaisonName:'',
        liaisonMobile:''
      },
      value: 0,
      uuid: '',
      images: [],
      imgType: '',
      loading:false
    }
  },
  components: {
    myNavbar
  },
  created() {
  },
  methods: {
    realNameClick() {
      var _this = this
      if (_this.loading == true){
        return;
      }
      _this.loading = true
      console.log("1111111111111111321333333")
      console.log(this.realNameForm.liaisonMobile)
      console.log(this.realNameForm.liaisonName)
      let params ={
        liaisonName:this.realNameForm.liaisonName,
        liaisonMobile:this.realNameForm.liaisonMobile,
      }
      bindLiaison(params).then(res=>{
        _this.loading = false
        if (res.type == "success") {
          eeui.toast({
            message: '绑定成功！'
          })
          eeui.closePage()
        }
      }).catch(error=>{
        _this.loading = false
        eeui.confirm({
          title: "温馨提示",
          message: '保存失败',
          buttons: [{
            title: "确定",
            type: "positive"
          }]
        }, function (result) {
          if (result.status == "click" && result.title == "确定") {
            eeui.closePage()
          }
        });
      })
    }
  }
}
</script>
<style lang="css" src="../../../style/wx.css"/>
<style scoped>
.app {
  background-color: rgba(248, 248, 248, 1);
}
.realName {
  border-radius: 16px;
  background-color: white;
  width: 710px;
  margin-left: 20px;
  margin-top: 50px;
  padding-bottom: 20px;
}
.realName_item {
  border-bottom-style: solid;
  border-bottom-width: 1px;
  border-bottom-color: #b9bbba;
  width: 600px;
  margin-left: 55px;
  padding-bottom: 20px;
  padding-top: 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.realName_item_title {
  font-size: 29px;
  color: #333333;
  width: 160px;
}

.realName_item_content {
  flex: 1;
  height: 60px;
  font-size: 29px;
}

.realName_botton {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 600px;
  margin-left: 50px;
  height: 80px;
  border-radius: 12px;
  background-color: red;
  margin-top: 80px;
}

.realName_botton_title {
  font-size: 29px;
  color: white;
}
</style>









